import request from '@/utils/request'
// 登录请求
export const getUser = () => {
  return request({
    url: '/user/getUserInfo',
    method: 'POST'
  })
}

export const getToken = ({ username, password, code, uuid }) => {
  const data = {
    username,
    password,
    code,
    uuid
  }
  return request({
    url: '/login',
    method: 'POST',
    data: data
  })
}

// 获取验证码
export function getCodeImg() {
  return request({
    url: '/captchaImage',
    headers: {
      isToken: false
    },
    method: 'get',
    timeout: 20000
  })
}

// 猜你喜欢数据请求
export const getLikeListAPI = ({ limit = 4 }) => {
  return request({
    url: '/goods/relevant',
    params: {
      limit
    }
  })
}
